export default {
  items: [
    {
      name: '项目管理',
      icon: 'el-icon-menu',
      path: '/home',
      id: '0',
      submenus: [{ name: '项目列表', path: '/projectManagement' }]
    },
    {
      name: 'BIM管理',
      icon: 'el-icon-s-order',
      path: '/scheduler',
      id: '1',
      path: '/BIM_management',
      submenus: [{ name: 'BIM模型管理列表', path: '/plan' }]
    },
    {
      name: '订单管理',
      icon: 'el-icon-s-flag',
      id: '2',
      path: '/order_management',
      submenus: [{ name: '订单管理列表', path: '/orderManagementList' }]
    },
    {
      name: '排产管理',
      icon: 'el-icon-s-marketing',
      id: '4',
      path: '/production_management',
      submenus: [
        { name: '排产计划', path: '/productionManagementList' },
        { name: '生产计划', path: '/technologyprocesslist' },
        { name: '生产任务单', path: '/taskOrders' }
      ]
    },
    {
      name: '生产过程管理',
      icon: 'el-icon-s-claim',
      id: '5',
      path: '/production_process_management',
      submenus: [
        { name: '生产计划', path: '/inspection' },
        { name: '生产任务', path: '/taskList' },
        { name: '过程更新', path: '/processUpdate' }
      ]
    },
    {
      name: '资料管理',
      icon: 'el-icon-s-opportunity',
      id: '6',
      path: '/materia_management',
      submenus: [{ name: '资料管理列表', path: '/materiaList' }]
    },
    {
      name: '工艺与产线',
      icon: 'el-icon-s-home',
      id: '7',
      path: '/processing_production_management',
      submenus: [
        { name: '工艺流程', path: '/processList' },
        { name: '工序管理', path: '/processManege' }
      ]
    },
    {
      name: '平台管理',
      icon: 'el-icon-menu',
      id: '8',
      path: '/system_manage',
      submenus: [
        { name: '人员管理', path: '/sys_empList' },
        { name: '职务管理', path: '/sys_positionList' },
        { name: '部门管理', path: '/sys_orgList' },
        { name: '企业管理', path: '/sys_companyList' },
        { name: '流程管理', path: '/sys_processList' }
      ]
    }
  ],

  // 对于日期的处理
  dateFormatter: (value, fmt = 'yyyy-MM-dd') => {
    if (!value) {
      return ''
    }
    let date = new Date(Number(value))
    let o = {
      'M+': date.getMonth() + 1, //月份
      'd+': date.getDate(), //日
      'h+': date.getHours(), //小时
      'm+': date.getMinutes(), //分
      's+': date.getSeconds(), //秒
      'q+': Math.floor((date.getMonth() + 3) / 3), //季度
      S: date.getMilliseconds() //毫秒
    }
    if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
    for (var k in o)
      if (new RegExp('(' + k + ')').test(fmt))
        fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
    return fmt
  }
}
